//
//  ViewController.m
//  SGYPhotoPicker
//
//  Created by ShiMac on 15/6/3.
//  Copyright (c) 2015年 guoyan. All rights reserved.
//

#import "ViewController.h"
#import "SgyPhotosListViewController.h"
@interface ViewController ()
{
    UIButton *btn;

}

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor=[UIColor whiteColor];
    
    
    btn=[[UIButton alloc]initWithFrame:CGRectMake(0, 0, 100, 30)];
    btn.center=self.view.center;
    [btn setTitle:@"click me" forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(clickAction) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
    
    
}

-(void)clickAction
{
    
    SgyPhotosListViewController *sgy=[[SgyPhotosListViewController alloc]init];
    UINavigationController *nav=[[UINavigationController alloc]initWithRootViewController:sgy];
    [self presentViewController:nav animated:YES completion:nil];
    
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
